
export default{
    mode:'history',
    routes: [
        {
            path:"/",
            name:"Home",
            // alias: '/index*', //别名
            //如果像这个样子直接配置组件，会在页面加载的时候把所有的组件全部加载上
            //component:Home
            //按需加载，使用函数式的声明
            component:()=>import('@/views/home/NewHome')
        },
        {
            path:"/service",
            name:"Service",
            meta:{
                auth:"service"
            },
            component:()=>import('@/views/service/NewService.vue')
        },
        {
            path:"/storeApply",
            name:"StoreApply",
            meta:{
                auth:"storeApply"
            },
            component:()=>import('@/views/store/NewStoreAdd.vue')
        },
        {
            path:"/store",
            name:"Store",
            meta:{
                auth:"store"
            },
            component:()=>import('@/views/store/NewStoreList.vue')
        },
        {
            path:"/commodityOrder",
            name:"CommodityOrder",
            meta:{
                auth:"order"
            },
            component:()=>import('@/views/order/NewCommodityOrder.vue')
        },
        {
            path:"/serviceOrder",
            name:"ServiceOrder",
            meta:{
                auth:"order"
            },
            component:()=>import('@/views/order/NewServiceOrder.vue')
        },
        {
            path:"/user",
            name:"User",
            meta:{
                auth:"user"
            },
            component:()=>import('@/views/user/NewUser.vue')
        },
        {
            path:"/role",
            name:"Role",
            meta:{
                auth:"role"
            },
            component:()=>import('@/views/role/NewRole.vue')
        },
        {
            path:"/authority",
            name:"Authority",
            meta:{
                auth:"authority"
            },
            component:()=>import('@/views/authority/NewAuthority.vue')
        },
        {
            path:"/commodity",
            name:"Commodity",
            meta:{
                auth:"commodity"
            },
            component:()=>import('@/views/commodity/NewCommodity.vue')
        },
        {
            path:"/master",
            name:"Master",
            meta:{
                auth:"master"
            },
            component:()=>import('@/views/pet/NewPetMaster.vue')
        },
        {
            path:"/pet",
            name:"Pet",
            meta:{
                auth:"master"
            },
            component:()=>import('@/views/pet/NewPet.vue')
        },
        {
            path:"/login",
            name:"Login",
            component:()=>import('@/views/Login.vue')
        },
        {
            path:"/register",
            name:"Register",
            component:()=>import('@/views/Register.vue')
        },
        {
            path:"/location",
            name:"Location",
            meta:{
                auth:"Statistics"
            },
            component:()=>import('@/views/map/NewBaiduMap.vue')
        },
        {
            path:"/sale",
            name:"Sale",
            meta:{
                auth:"Statistics"
            },
            component:()=>import('@/views/echarts/NewEcharts.vue')
        },
        {
            path:"/money",
            name:"Money",
            meta:{
                auth:"Statistics"
            },
            component:()=>import('@/views/echarts/NewEcharts2.vue')
        },
        {
            path:"*",
            name:"404",
            component:()=>import('@/views/NotFound')
        },
    ]
}